/**
 * Created by suweiming on 2017/12/30.
 */
import { Button, Text, Icon, Footer, FooterTab } from "native-base";
import { TabNavigator } from "react-navigation";
import Home from "./home/home";
import Store from "./store";
export default (MainScreenNavigator = TabNavigator(
    {
        Home: { screen: Home },
        Store: { screen: Store },
    },
    {
        tabBarPosition: "bottom",
        tabBarComponent: props => {
            return (
                <Footer>
                    <FooterTab>
                        <Button
                            vertical
                            active={props.navigationState.index === 0}
                            onPress={() => props.navigation.navigate("Home")}>
                            <Icon name="bowtie" />
                            <Text>首页</Text>
                        </Button>
                        <Button
                            vertical
                            active={props.navigationState.index === 1}
                            onPress={() => props.navigation.navigate("JadeChat")}>
                            <Icon name="briefcase" />
                            <Text>库存</Text>
                        </Button>
                        <Button
                            vertical
                            active={props.navigationState.index === 2}
                            onPress={() => console.log("JadeChat")}>
                            <Icon name="briefcase" />
                            <Text>扫描</Text>
                        </Button>
                        <Button
                            vertical
                            active={props.navigationState.index === 3}
                            onPress={() => props.navigation.navigate("NineChat")}>
                            <Icon name="headset" />
                            <Text>财务</Text>
                        </Button>
                        <Button
                            vertical
                            active={props.navigationState.index === 4}
                            onPress={() => props.navigation.navigate("NineChat")}>
                            <Icon name="headset" />
                            <Text>报表</Text>
                        </Button>
                    </FooterTab>
                </Footer>
            );
        }
    }
));